// Uncomment this block to pass the first stage
use tractors::{config, server};

fn main(){
    // You can use print statements as follows for debugging, they'll be visible when running tests.
    println!("Logs from your program will appear here!");
    let config = config::configuration::Config::init();
    let host  = if config.get_value_for("host").is_some() {
        config.get_value_for("host").unwrap()
    } else {
        ""
    };
    let port = if config.get_value_for("port").is_some() {
        config.get_value_for("port").unwrap()
    } else {
        ""
    };
    let mut server = server::server::Server::new(host.to_string(), port.to_string(), config);
    server.run_in_thread_pool();

    /*let server = server::server::Server::new(host.to_string(), port.to_string(), config);
    server.run();*/
}


